package linkedListDemo;

public class Demo2 {
	public static void main(String args[]){
		Shop<Food> food = new Shop<Food>(new Food("apple"));
		System.out.println(food.sell());
		Shop<Pet> pet = new Shop<Pet>(new Pet("cat"));
		System.out.println(pet.sell());
	}
}
class Shop<T>{
	T t;
	public Shop(T t){
		this.t=t;
	}
	public T sell(){
		return t;
	}
}
class Food{
	private String name;
	public Food(String name){
		this.name=name;
	}
}
class Pet{
	private String name;
	public Pet(String name){
		this.name=name;
	}
}




